package com.shipxpress.register;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class ShipxInterceptor implements Interceptor{

    public void destroy() {
        System.out.println("Shipx interceptor found destroy method...");
    }

    public void init() {
        System.out.println("Shipx interceptor found init method...");
    }

    public String intercept(ActionInvocation actionInvocation) throws Exception {
        System.out.println("Shipx interceptor called before actionInvocation.invoke() ");
        String result = actionInvocation.invoke();
        System.out.println("Shipx interceptor called after actionInvocation.invoke() ");
        return result;
    }
}
